package com.potenza.media.auth.sys.feign;

import io.renren.modules.sys.entity.SysUserEntity;
import io.renren.modules.sys.entity.SysUserTokenEntity;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;

import java.util.Set;

@FeignClient(value = "renren-fast", contextId = "sys",fallback = ShiroServiceFeignClientImpl.class)
public interface ShiroServiceFeignClient {

    @GetMapping("shiro/getUserPermissions/{userId}")
    public Set<String> getUserPermissions(@PathVariable Long userId);
    @GetMapping("shiro/queryByToken/{accessToken}")
    SysUserTokenEntity queryByToken(@PathVariable String accessToken);
    @GetMapping("shiro/queryUser/{userId}")
    SysUserEntity queryUser(@PathVariable Long userId);
}
